package com.weirdor.wchat.admin.web;


import com.weirdor.wchat.admin.web.base.AbstractController;
import com.weirdor.wchat.common.utils.PageUtils;
import com.weirdor.wchat.common.utils.R;
import com.weirdor.wchat.module.service.ISysLogService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>
 * 系统日志 前端控制器
 * </p>
 *
 * @author weirdor
 * @since 2018-03-05
 */
@RestController
@RequestMapping("/sysLog")
public class SysLogController  extends AbstractController{

    @Autowired
    private ISysLogService sysLogService;

    /**
     * 列表
     */
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @RequiresPermissions("sys:log:list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = sysLogService.queryPage(params);
        return R.ok().put("page", page);
    }
}

